import request from "@/utils/request.js";

export function ApiDashboardRawQuery(data) {
    return request({
        url: '/v1/dashboard/raw_query',
        method: 'post',
        data: data
    })
}

export function ApiDashboardCreate(data) {
    return request({
        url: '/v1/dashboard',
        method: 'post',
        data: data
    })
}

export function ApiDashboardList(data) {
    return request({
        url: '/v1/dashboard',
        method: 'get',
    })
}

export function ApiDashboardUpdate(id, data) {
    return request({
        url: '/v1/dashboard/' + id,
        method: 'put',
        data: data
    })
}

export function ApiDashboardDelete(id, data) {
    return request({
        url: '/v1/dashboard/' + id,
        method: 'delete',
    })
}

export function ApiDashboardSQLQuery(data) {
    return request({
        url: '/v1/dashboard/sql_query',
        method: 'post',
        data: data
    })
}
